
<template>
  <!-- loading组件 -->
  <div class="loading">
    <img src="../../assets/img/loading.svg" alt>
    <p>加载中...</p>
    <div class="cover"></div>
  </div>
</template>

<script>
export default {
  name: 'loading',
  data () {
    return {}
  }
}
</script>
<style scoped>
.loading {
  position: fixed;
  top: 40%;
  left: 0;
  right: 0;
  z-index: 9999;
  line-height: 100%;
  width: 100px;
  height: 100px;
  margin: auto;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.6);
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}
.loading img {
  width: 1.8rem;
  height: 1.8rem;
  margin: 1.5rem auto 0 auto;
}
.loading p {
  font-size: 14px;
  color: #ffffff;
}
.cover {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  justify-content: center;
  align-items: center;
  z-index: 5;
  background: transparent;
}
</style>
